﻿using BCCommon;
using BCCommon.Enums;
using BCDto.TMS.HealthReport;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCService.TMS.HealthReport
{
    /// <summary>
    /// 健康上报服务层
    /// </summary>
    public interface IHealthReportService
    {
        /// <summary>
        /// 创建一条健康上报信息
        /// </summary>
        /// <param name="healthReportRequestDto">健康上报请求信息</param>
        /// <param name="personId">人员ID</param>
        /// <param name="userId">用户ID</param>
        /// <param name="userName">名称</param>
        /// <param name="role">角色</param>
        /// <param name="companyId">公司Id</param>
        /// <returns></returns>
        HealthReportDto Create(HealthReportRequestDto healthReportRequestDto, long personId, long? userId, string userName, RoleType role, long? companyId = null);

        /// <summary>
        /// 获取健康上报列表
        /// </summary>
        /// <param name="companyId">公司Id</param>
        /// <param name="start">上报时间开始时间</param>
        /// <param name="end">上报时结束时间</param>
        /// <param name="ascending">是否正序</param>
        /// <param name="index">页号</param>
        /// <param name="size">每页数据条数</param>
        /// <param name="userId">用户ID</param>
        /// <param name="role">角色</param>
        /// <param name="isFever">是否发烧</param>
        /// <param name="isCoughs">是否咳嗽</param>
        /// <returns></returns>
        PageableList<HealthReportDto> GetList(long? companyId, DateTime? start, DateTime? end, bool? ascending, int? index, int? size, long? userId, RoleType? role, bool? isFever, bool? isCoughs);

        /// <summary>
        /// 获取健康上报统计列表
        /// </summary>
        /// <param name="timeSpan">时间间隔（天）</param>
        /// <returns></returns>
        HealthReportAnalysisViewDto GetAnalysisList(int? timeSpan);

        /// <summary>
        /// 获取个人健康上报阈值列表
        /// </summary>
        /// <param name="timeSpan">时间间隔（天）</param>
        /// <param name="role">角色</param>
        /// <param name="userId">用户ID</param>
        /// <returns></returns>
        IEnumerable<HealthReportUserDto> GetAnalysisUserList(int? timeSpan, RoleType role, long userId);
    }
}
